package com.nimitz.modules.approval.service;


import com.nimitz.modules.approval.domain.ApprovalInstance;
import com.nimitz.modules.approval.mapper.ApprovalInstanceMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName IApprovalInstanceService
 * @Author FuCun
 * @Date 2021-08-17-14:45
 * @PackageName com.nimitz.modules.approval.service
 * @Description 审批实例-接口
 * @Version 1.0.0
 */
public interface IApprovalInstanceService {
    /**
     * 查询所有审批实例（含搜索）
     *
     * @param approvalInstance 审批实例
     * @return 审批人员集合
     */
    List<ApprovalInstance> selectApprovalInstanceList(ApprovalInstance approvalInstance);

    /**
     * 新增审批实例
     *
     * @param approvalInstance 审批实例
     * @return 结果
     */
    int insertApprovalInstance(ApprovalInstance approvalInstance);

    /**
     * 修改审批实例
     *
     * @param approvalInstance 审批实例
     * @return 结果
     */
    int updateApprovalInstance(ApprovalInstance approvalInstance);

    /**
     * 删除审批实例
     *
     * @param instanceId 审批实例id
     * @return 结果
     */
    int deleteApprovalInstanceByInstanceId(Long instanceId);

    /**
     * 校验审批实例编号是否唯一
     *
     * @param instanceNo 审批实例编号
     * @return 结果
     */
    ApprovalInstance checkApprovalInstanceIdUnique(@Param("instanceNo") Long instanceNo);
}
